package com.five.monkey.feign.es.dao.model;

import lombok.Data;
import lombok.experimental.Accessors;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import java.util.Date;

/**
 * @author 狻猊
 * @date 2022-03-29 14:23:40
 */
@Data
@Accessors(chain = true)
@Document(indexName = "t_card")
public class Card {

    /**
     * 主键
     */
    @Id
    private Long id;

    /**
     * 卡片标题
     */
    @Field(name = "title", type = FieldType.Keyword)
    private String title;

    /**
     * 卡片内容
     */
    @Field(name = "content", type = FieldType.Text, analyzer = "ik_max_word", searchAnalyzer = "ik_max_word")
    private String content;

    /**
     * 卡片创建者id
     */
    @Field(name = "adminId", type = FieldType.Long)
    private Long adminId;

    /**
     * 卡片状态。1：编辑中；2：待审核；3：审核通过；4：被退回
     */
    @Field(name = "status", type = FieldType.Integer)
    private Integer status;

    /**
     * 卡片创建时间
     */
    @Field(name = "createTime", type = FieldType.Keyword)
    private String createTime;
}
